<template>
  <div class="box">
    <div class="title">
      <div>{{ title }}</div>
      <div>
        <slot name="button"></slot>
      </div>
    </div>
    <div class="content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import { defineComponent } from "vue";
export default defineComponent({
  components: {},
  props: {
    title: {
      type: String,
      default: "",
    },
  },
  data() {
    return {};
  },
  methods: {},
  mounted() { },
});
</script>

<style lang='scss' scoped>
.box {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e4e7ed;
  font-family: 微软雅黑;
  font-weight: 400;
  font-size: 14px;

  .title {
    // width: 100%;
    height: 40px;
    line-height: 40px;
    background-color: #f8f8f8;
    padding: 0px 15px;
    box-sizing: border-box;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    justify-content: space-between;
    color: #3c4144;
  }
}

.content {
  height: calc(100% - 40px);
  padding: 8px;
  overflow-x: auto;
  overflow-y: auto;
}
</style>